<!DOCTYPE html>
<html>
  <head>
    <title>Shenyang Expat Taxi Book & Map</title>
    <link href="./stylesheet.css" media="screen" rel="stylesheet" type="text/css" />
  </head>
<body>

<!-- ++Begin Variable Passing Code from http://www.netlobo.com/url_query_string_javascript.html ++ -->

<script type="text/javascript">
//<![CDATA

function gup( name )
{
  name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
  var regexS = "[\\?&]"+name+"=([^&#]*)";
  var regex = new RegExp( regexS );
  var results = regex.exec( window.location.href );
  if( results == null )
    return "";
  else
    return results[1];

}
//]]>

</script>

<!-- ++Begin small script to set param_wsId ++ -->
<script type="text/javascript">
//<![CDATA

// alert(gup( 'param_wsId' ));

var param_wsId = gup( 'param_wsId' );

if (param_wsId != "")
  {
  // alert(param_wsId);
  param_wsId == escape(param_wsId)
  // alert(unescape(param_wsId));
  param_wsId == unescape(param_wsId)
  }
  else
  {
  param_wsId = "Published";
  }

//]]>
</script>

<h1 align="center">Shenyang Expat Taxi Book & Map</h1>

<h2 align="center">
  | <a href="map.html?param_wsId=32">Map View</a> | 
  <a href="book.html?param_wsId=Published">Book View</a> | 
  <a href="https://docs.google.com/forms/d/17POHdLC8DDOUfVrEXh5MsyWWBk9MG3BavzNkcRV55rc/viewform" target="_blank">Submit Location</a> | 
</h2>

<h3 align="center">
<a href="book.html?param_wsId=Published">All Locations</a> | 

<a href="book.html?param_wsId=Hotels">Hotels</a> | 
<a href="book.html?param_wsId=Information">General Information</a> | 
<a href="book.html?param_wsId=Groceries">Groceries</a> | 
<a href="book.html?param_wsId=Shopping">Shopping</a> | 
<a href="book.html?param_wsId=Entertainment">Entertainment</a> | 
<a href="book.html?param_wsId=Sightseeing">Sightseeing & Parks</a> 
</h3>

<h3 align="center">

<select onchange="if (this.value) window.location.href=this.value">
    <option value="" selected>Locations by District / County</option>
    <option value="">Shenhe</option>
    <option value="book.html?param_wsId=Heping">Heping</option>
    <option value="book.html?param_wsId=Dadong">Dadong</option>
    <option value="">Huanggu</option>
    <option value="book.html?param_wsId=Tiexi">Tiexi</option>
    <option value="">Sujiatun</option>
    <option value="">Dongling</option>
    <option value="book.html?param_wsId=Shenbei">Shenbei</option>
    <option value="">Yuhong</option>
    <option value="">Xinmin</option>
    <option value="">Liaozhong</option>
    <option value="">Kangping</option>
    <option value="">Faku</option>
</select>
 | 
<a href="book.html?param_wsId=Restaurants">All Restaurants & Bars</a> : 
<select onchange="if (this.value) window.location.href=this.value">
    <option value="" selected>Restaurants by Services</option>
    <option value="">Delivery</option>
    <option value="">Take-out</option>
    <option value="">Catering</option>
    <option value="">Beer selection</option>
    <option value="">Wine selection</option>
    <option value="">Cocktails</option>
</select>    
<select onchange="if (this.value) window.location.href=this.value">
    <option value="" selected>Restaurants by Cuisine</option>
    <option value="book.html?param_wsId=Chinese">Chinese</option>
    <option value="book.html?param_wsId=Western">Western</option>
    <option value="">Japanese</option>
    <option value="">Korean</option>
    <option value="book.html?param_wsId=Coffee">Coffee / Tea</option>    
    <option value="">Fast-food</option>
</select>


</h3>

    <div id="content"></div>
    
    <script id="place-template" type="text/x-handlebars-template">
      <div class="entry">
        <h2>{{name}}</h2>
        <h3>{{address}}</h3>
        <div class="body">
          {{{description}}}
        </div>
      </div>
    </script>


    <script type="text/javascript" src="handlebars.js"></script>
    <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
    <script type="text/javascript" src="tabletop.js"></script>
    <script type="text/javascript">
      var public_spreadsheet_url = 'https://docs.google.com/spreadsheet/pub?hl=en_US&hl=en_US&key=0Arrv16mpemDHdFhMbHdFODlxdU8yMVI0UVBRNFk1WEE&output=html'; 

      $(document).ready( function() {
        Tabletop.init( { key: public_spreadsheet_url,
                         callback: showInfo,
                         parseNumbers: true } );
      });
        
      function showInfo(data, tabletop) {
        var source   = $("#place-template").html();
        var template = Handlebars.compile(source);

        $.each( tabletop.sheets(param_wsId).all(), function(i, place) {
          var html = template(place);
          $("#content").append(html);
        });
      }
      document.write("<br clear=\"all\" />")
      document.write("The published spreadsheet is located at <a target='_new' href='" + public_spreadsheet_url + "'>" + public_spreadsheet_url + "</a>");    
    </script>

</body>
</html>
